export interface User {
  id: number
  username: string
  email?: string
  phone?: string
  nickname?: string
  avatar?: string
  role: 'ADMIN' | 'USER' | 'GUEST'
  createdAt: Date
  updatedAt: Date
}

export interface FamilyMember {
  id: number
  userId?: number
  name: string
  gender: 'MALE' | 'FEMALE'
  birthDate?: Date
  deathDate?: Date
  isAlive: boolean
  avatar?: string
  bio?: string
  parentId?: number
  spouseId?: number
  generation: number
  createdAt: Date
  updatedAt: Date
}

export interface FamilyTree {
  id: number
  name: string
  description?: string
  rootMemberId: number
  createdBy: number
  createdAt: Date
  updatedAt: Date
}

export interface Honor {
  id: number
  title: string
  description?: string
  memberId: number
  honorType: 'ACHIEVEMENT' | 'AWARD' | 'RECOGNITION'
  dateReceived?: Date
  imageUrl?: string
  createdAt: Date
}

export interface ClanTemplate {
  id: number
  title: string
  content: string
  templateType: 'ACTIVITY' | 'RULE' | 'MEETING' | 'VENUE'
  createdBy: number
  createdAt: Date
  updatedAt: Date
}

export interface Comment {
  id: number
  content: string
  templateId: number
  userId: number
  parentId?: number
  level: number
  createdAt: Date
  updatedAt: Date
}

export interface AIConversation {
  id: number
  userId: number
  sessionId: string
  message: string
  response: string
  modelUsed?: string
  scenario?: string
  roleSimulated?: string
  createdAt: Date
}

export interface LoginRequest {
  username: string
  password: string
}

export interface RegisterRequest {
  username: string
  password: string
  email?: string
  phone?: string
  nickname?: string
}

export interface ApiResponse<T = any> {
  success: boolean
  data?: T
  message?: string
  error?: string
}

export interface AuthPayload {
  userId: number
  username: string
  role: string
}

export interface PaginationParams {
  page?: number
  limit?: number
  sortBy?: string
  sortOrder?: 'asc' | 'desc'
}

export interface PaginatedResponse<T> {
  data: T[]
  pagination: {
    page: number
    limit: number
    total: number
    pages: number
  }
}